2025-03-23 10:29:27,596 - INFO - Num classes: 3
2025-03-23 10:35:00,435 - INFO - Class weights: tensor([0.6006, 2.8061, 1.0217], device='cuda:0')
2025-03-23 10:35:00,483 - INFO - Model architecture:
CombinedModel(
  (unet): Unet(
    (conv1): Sequential(
      (0): Conv2d(1080, 8, kernel_size=(3, 3), stride=(1, 1), padding=(5, 5))
      (1): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(8, 8, kernel_size=(3, 3), stride=(1, 1), padding=(5, 5))
      (4): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (conv2): Sequential(
      (0): Conv2d(8, 16, kernel_size=(3, 3), stride=(1, 1), padding=(2, 2))
      (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(16, 16, kernel_size=(3, 3), stride=(1, 1), padding=(2, 2))
      (4): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (conv3): Sequential(
      (0): Conv2d(16, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(32, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (upconv3): Sequential(
      (0): Conv2d(32, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(16, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(16, 16, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
    (upconv2): Sequential(
      (0): Conv2d(32, 8, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(8, 8, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(8, 8, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
    (upconv1): Sequential(
      (0): Conv2d(16, 3, kernel_size=(7, 7), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(3, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(3, 3, kernel_size=(7, 7), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(3, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(3, 3, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
  )
  (san): ImprovedHyperspectralLogisticRegressionModel(
    (spectral_attention): SpectralAttention(
      (fc): Sequential(
        (0): Linear(in_features=1080, out_features=67, bias=True)
        (1): ReLU(inplace=True)
        (2): Linear(in_features=67, out_features=1080, bias=True)
        (3): Sigmoid()
      )
    )
    (linear): Sequential(
      (0): LinearBlock(
        (block): Sequential(
          (0): Linear(in_features=1080, out_features=20, bias=True)
          (1): BatchNorm1d(20, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): LeakyReLU(negative_slope=0.1)
          (3): Dropout(p=0.0, inplace=False)
        )
      )
      (1): LinearBlock(
        (block): Sequential(
          (0): Linear(in_features=20, out_features=20, bias=True)
          (1): BatchNorm1d(20, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): LeakyReLU(negative_slope=0.1)
          (3): Dropout(p=0.0, inplace=False)
        )
      )
      (2): Linear(in_features=20, out_features=3, bias=True)
    )
    (logistic): Linear(in_features=3, out_features=3, bias=True)
  )
  (mlp): Sequential(
    (0): Linear(in_features=6, out_features=256, bias=True)
    (1): ReLU(inplace=True)
    (2): BatchNorm1d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (3): Dropout(p=0.2, inplace=False)
    (4): Linear(in_features=256, out_features=128, bias=True)
    (5): ReLU(inplace=True)
    (6): BatchNorm1d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (7): Dropout(p=0.2, inplace=False)
    (8): Linear(in_features=128, out_features=3, bias=True)
  )
)
2025-03-23 10:35:00,483 - INFO - Using cuda device
2025-03-23 10:43:47,435 - INFO - Epoch: 0/100. Training time: 348.132
2025-03-23 10:43:47,435 - INFO - Training Metrics...
2025-03-23 10:43:47,435 - INFO - {'loss': 0.8685394134491112, 'f1': 53.78592708253649, 'acc': 60.40736607142857, 'precision': 58.69840140916798, 'recall': 62.05461520520183, 'balanced acc': 62.05461520520183}
2025-03-23 10:43:47,435 - INFO - Validation Metrics... Inference time: 178.814
2025-03-23 10:43:47,435 - INFO - {'loss': 0.6576875922007438, 'f1': 66.58880310208917, 'acc': 79.57806469943746, 'precision': 71.48472209350687, 'recall': 73.95352766255165, 'balanced acc': 73.95352766255165}
2025-03-23 10:43:47,435 - INFO - ==================================================
2025-03-23 11:27:26,644 - INFO - Epoch: 5/100. Training time: 344.359
2025-03-23 11:27:26,644 - INFO - Training Metrics...
2025-03-23 11:27:26,644 - INFO - {'loss': 0.5909813334987422, 'f1': 70.9711325485706, 'acc': 77.73653300890419, 'precision': 70.2203023855232, 'recall': 77.46382616624207, 'balanced acc': 77.46382616624207}
2025-03-23 11:27:26,644 - INFO - Validation Metrics... Inference time: 179.326
2025-03-23 11:27:26,644 - INFO - {'loss': 0.5181237825980554, 'f1': 69.79964123477862, 'acc': 81.39576894459707, 'precision': 68.8066843171541, 'recall': 75.51166897980501, 'balanced acc': 75.51166897980501}
2025-03-23 11:27:26,644 - INFO - ==================================================
2025-03-23 12:11:54,357 - INFO - Epoch: 10/100. Training time: 351.367
2025-03-23 12:11:54,358 - INFO - Training Metrics...
2025-03-23 12:11:54,358 - INFO - {'loss': 0.5864769038121411, 'f1': 71.28280152926078, 'acc': 78.19775028841156, 'precision': 70.03476765381798, 'recall': 78.66011637083187, 'balanced acc': 78.66011637083187}
2025-03-23 12:11:54,358 - INFO - Validation Metrics... Inference time: 186.110
2025-03-23 12:11:54,358 - INFO - {'loss': 0.4771088904295212, 'f1': 72.53463239911451, 'acc': 84.28830516581633, 'precision': 74.26670007248491, 'recall': 75.05699911914093, 'balanced acc': 75.05699911914093}
2025-03-23 12:11:54,358 - INFO - ==================================================
2025-03-23 12:56:23,927 - INFO - Epoch: 15/100. Training time: 348.839
2025-03-23 12:56:23,927 - INFO - Training Metrics...
2025-03-23 12:56:23,927 - INFO - {'loss': 0.5714277465632007, 'f1': 72.08850349661651, 'acc': 78.41642006125699, 'precision': 71.34954889412545, 'recall': 79.12695682828038, 'balanced acc': 79.12695682828038}
2025-03-23 12:56:23,927 - INFO - Validation Metrics... Inference time: 184.384
2025-03-23 12:56:23,927 - INFO - {'loss': 0.47810216362659747, 'f1': 71.67866066643953, 'acc': 83.3915642579147, 'precision': 72.27406020377848, 'recall': 75.77893399947409, 'balanced acc': 75.77893399947409}
2025-03-23 12:56:23,927 - INFO - ==================================================
2025-03-23 13:40:32,481 - INFO - Epoch: 20/100. Training time: 344.501
2025-03-23 13:40:32,483 - INFO - Training Metrics...
2025-03-23 13:40:32,483 - INFO - {'loss': 0.5241555677857369, 'f1': 74.3021200973708, 'acc': 80.65218075685688, 'precision': 73.3724485246665, 'recall': 80.16444377378231, 'balanced acc': 80.16444377378231}
2025-03-23 13:40:32,483 - INFO - Validation Metrics... Inference time: 181.904
2025-03-23 13:40:32,483 - INFO - {'loss': 0.4958471625279158, 'f1': 70.3251503521791, 'acc': 81.98311175431712, 'precision': 70.6694282770883, 'recall': 75.64408994737238, 'balanced acc': 75.64408994737238}
2025-03-23 13:40:32,483 - INFO - ==================================================
2025-03-23 14:24:42,295 - INFO - Epoch: 25/100. Training time: 349.605
2025-03-23 14:24:42,296 - INFO - Training Metrics...
2025-03-23 14:24:42,296 - INFO - {'loss': 0.534971131450811, 'f1': 74.20711730472303, 'acc': 79.73432879322111, 'precision': 73.2467960949123, 'recall': 80.56966917452668, 'balanced acc': 80.56966917452668}
2025-03-23 14:24:42,296 - INFO - Validation Metrics... Inference time: 182.600
2025-03-23 14:24:42,296 - INFO - {'loss': 0.4749930073053409, 'f1': 71.45196742901123, 'acc': 83.12429990024856, 'precision': 71.77794650242375, 'recall': 75.491494072072, 'balanced acc': 75.491494072072}
2025-03-23 14:24:42,296 - INFO - ==================================================
2025-03-23 15:08:45,034 - INFO - Epoch: 30/100. Training time: 346.696
2025-03-23 15:08:45,035 - INFO - Training Metrics...
2025-03-23 15:08:45,035 - INFO - {'loss': 0.5502138084666744, 'f1': 72.13643239522524, 'acc': 79.16470330170286, 'precision': 70.96251868989026, 'recall': 79.3884830716932, 'balanced acc': 79.3884830716932}
2025-03-23 15:08:45,035 - INFO - Validation Metrics... Inference time: 182.316
2025-03-23 15:08:45,035 - INFO - {'loss': 0.4674029075182401, 'f1': 72.33115339732473, 'acc': 83.60867183411827, 'precision': 72.15266745309555, 'recall': 75.91066000214929, 'balanced acc': 75.91066000214929}
2025-03-23 15:08:45,035 - INFO - ==================================================
2025-03-23 15:17:34,186 - INFO - Early stopping criterion met. Stopping training.
2025-03-23 15:17:34,977 - INFO - Initializing final Evaluations:

2025-03-23 15:20:36,216 - INFO - Final validation metrics:
{'f1': 72.87222322997864, 'acc': 84.28830516581633, 'precision': 73.71230294737227, 'recall': 75.65034696630022, 'balanced acc': 75.65034696630022}
2025-03-23 15:22:45,554 - INFO - Final test pixel-wise classification metrics:
{'f1': 76.39568090767777, 'acc': 80.12035055038373, 'precision': 77.69781932747254, 'recall': 78.82783718432177, 'balanced acc': 78.82783718432177}
2025-04-05 02:27:28,548 - INFO - Num classes: 3
2025-04-05 02:27:28,551 - INFO - Class weights: None
2025-04-05 02:27:28,715 - INFO - Model architecture:
CombinedModel(
  (unet): Unet(
    (conv1): Sequential(
      (0): Conv2d(1080, 8, kernel_size=(3, 3), stride=(1, 1), padding=(5, 5))
      (1): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(8, 8, kernel_size=(3, 3), stride=(1, 1), padding=(5, 5))
      (4): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (conv2): Sequential(
      (0): Conv2d(8, 16, kernel_size=(3, 3), stride=(1, 1), padding=(2, 2))
      (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(16, 16, kernel_size=(3, 3), stride=(1, 1), padding=(2, 2))
      (4): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (conv3): Sequential(
      (0): Conv2d(16, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(32, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (upconv3): Sequential(
      (0): Conv2d(32, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(16, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(16, 16, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
    (upconv2): Sequential(
      (0): Conv2d(32, 8, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(8, 8, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(8, 8, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
    (upconv1): Sequential(
      (0): Conv2d(16, 3, kernel_size=(7, 7), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(3, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(3, 3, kernel_size=(7, 7), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(3, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(3, 3, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
  )
  (san): ImprovedHyperspectralLogisticRegressionModel(
    (spectral_attention): SpectralAttention(
      (fc): Sequential(
        (0): Linear(in_features=1080, out_features=67, bias=True)
        (1): ReLU(inplace=True)
        (2): Linear(in_features=67, out_features=1080, bias=True)
        (3): Sigmoid()
      )
    )
    (linear): Sequential(
      (0): LinearBlock(
        (block): Sequential(
          (0): Linear(in_features=1080, out_features=20, bias=True)
          (1): BatchNorm1d(20, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): LeakyReLU(negative_slope=0.1)
          (3): Dropout(p=0.0, inplace=False)
        )
      )
      (1): LinearBlock(
        (block): Sequential(
          (0): Linear(in_features=20, out_features=20, bias=True)
          (1): BatchNorm1d(20, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): LeakyReLU(negative_slope=0.1)
          (3): Dropout(p=0.0, inplace=False)
        )
      )
      (2): Linear(in_features=20, out_features=3, bias=True)
    )
    (logistic): Linear(in_features=3, out_features=3, bias=True)
  )
  (mlp): Sequential(
    (0): Linear(in_features=6, out_features=256, bias=True)
    (1): ReLU(inplace=True)
    (2): BatchNorm1d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (3): Dropout(p=0.2, inplace=False)
    (4): Linear(in_features=256, out_features=128, bias=True)
    (5): ReLU(inplace=True)
    (6): BatchNorm1d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (7): Dropout(p=0.2, inplace=False)
    (8): Linear(in_features=128, out_features=3, bias=True)
  )
)
2025-04-05 02:27:28,716 - INFO - Using cuda device
2025-04-05 02:27:28,737 - INFO - Initializing final Evaluations:

